﻿<%@ Page Title="" Language="C#" MasterPageFile="~/back/Site.master" AutoEventWireup="true"
    CodeFile="ViewContent.aspx.cs" Inherits="back_ViewContent" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <div class="page-header">
        <h1>
            View Page Contents</h1>
    </div>
    <div id="divRed" runat="server">
        
    </div>
    <div id="divGreen" runat="server">
        
    </div>
    <asp:GridView ID="grdContents" runat="server" AutoGenerateColumns="false" ShowFooter="false"
        Width="100%" OnRowCommand="grdContents_RowCommand" OnRowDataBound="grdContents_RowDataBound"
        CssClass="table table-striped table-bordered">
        <Columns>
            <asp:TemplateField HeaderText="Page Name">
                <ItemTemplate>
                    <asp:Label ID="hdnUserId" Style="display: none;" runat="server" Text='<%#Eval("Id") %>'></asp:Label>
                    <asp:Label ID="lblPageName" runat="server" Text='<%#Eval("PageName") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Page Title">
                <ItemTemplate>
                    <asp:Label ID="lblPageTitle" runat="server" Text='<%#Eval("PageTitle") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Keywords">
                <ItemTemplate>
                    <asp:Label ID="lblKeywords" runat="server" Text='<%#Eval("MetaKeyword") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Description">
                <ItemTemplate>
                    <asp:Label ID="lblDescription" runat="server" Text='<%#Eval("MetaDescription") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Actions">
                <ItemTemplate>
                    <asp:Button ID="btnEdit" runat="server" CssClass="btn btn-info" Text="Edit" CommandName="EditContent"
                        OnClientClick="return confirm('Do you want to edit this content?')" />
                    &nbsp;&nbsp;
                    <asp:Button ID="btnDelete" runat="server" CssClass="btn btn-danger" Text="Delete"
                        CommandName="DeleteContent" OnClientClick="return confirm('Do you want to delete this content?')" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
</asp:Content>
